<?php
if (isset($rows) && count($rows) > 0) {
    ?>
    <h1>Daftar Group</h1>
    <table width="400" border="1" class="table table-striped">
        <thead>
            <tr>
                <th>#</th>
                <th>Nama</th>
                <th>Keterangan</th>
                <th>Jumlah Anggota</th>
                <th></th>
            </tr>
        </thead>
        <?php
        $i = 0;
        foreach ($rows as $row) {
            $i++;
            echo "<tr class=\"record\">";
            echo "<td>$i</td>";
            echo "<td>$row->nama_group</td>";
            echo "<td>$row->keterangan</td>";
            echo "<td>0</td>";
            echo "<td><a href='".site_url()."dosen/groupid/$row->id_group' class='btn btn-primary'>Manage</a>&nbsp;&nbsp;&nbsp;<a href='#' class='btn btn-warning'>Delete</a></td>";
            echo "</tr>";
        }
        ?>
    </table>
    <?php
}
?>